﻿<UserControl x:Class="MvvmLightSample.PersonView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:vm="clr-namespace:MvvmLightSample.ViewModel"
             mc:Ignorable="d"
             d:DesignHeight="20" d:DesignWidth="300"
             DataContext="{Binding Person, Source={StaticResource Locator}}"
>
    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
        <TextBlock Margin="5 0">Enter name </TextBlock>
        <TextBox Width="100" Text="{Binding Name, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True}" />
    </StackPanel>
</UserControl>